package com.mju.feign.clients;


import com.mju.controller.common.JsonResult;
import com.mju.pojo.Cart;
import com.mju.pojo.vo.CartVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("cart-service")
public interface CartClient {
    @GetMapping("/carts/list/{uid}")
    public JsonResult<List<CartVO>> selectVOByCidsAndUid(@PathVariable("uid") Integer uid, @RequestParam("cids") Integer[] cids);

    @GetMapping("/carts/queryCart/{cid}")
    public JsonResult<Cart> queryCartByCid(@PathVariable("cid") Integer cid);
}
